ExifApp* exif_app = nullptr;
while (! gbfeof(fin)) {
- auto* app = new ExifApp;
-
- exif_apps->append(*app);
- app = &exif_apps->last();
+ exif_apps->append(ExifApp());
+ ExifApp* app = &exif_apps->last();
app->fcache = gbfopen(nullptr, "wb", MYNAME);
app->marker = gbfgetuint16(fin);
{
gbfile* fin = app->fexif;
- auto* ifd = new ExifIfd;
- app->ifds.append(*ifd);
- ifd = &app->ifds.last();
+ app->ifds.append(ExifIfd());
+ ExifIfd* ifd = &app->ifds.last();
ifd->nr = ifd_nr;
gbfseek(fin, offs, SEEK_SET);
}
for (uint16_t i = 0; i < ifd->count; i++) {
- auto* tag = new ExifTag;
+ ifd->tags.append(ExifTag());
+ ExifTag* tag = &ifd->tags.last();
#ifdef EXIF_DBG
offs = gbftell(fin);
tag->offs = offs;
*inter_ifd_ofs = tag->value;
}
}
-
- ifd->tags.append(*tag);
}
#ifdef EXIF_DBG
ExifIfd* ifd = exif_find_ifd(exif_app, ifd_nr);
if (ifd == nullptr) {
- ifd = new ExifIfd;
- ifd->nr = ifd_nr;
- exif_app->ifds.append(*ifd);
+ exif_app->ifds.append(ExifIfd());
ifd = &exif_app->ifds.last();
+ ifd->nr = ifd_nr;
} else {
tag = exif_find_tag(exif_app, ifd_nr, tag_id);
return nullptr;
}
- tag = new ExifTag;
+ ifd->tags.append(ExifTag());
+ tag = &ifd->tags.last();
tag->id = tag_id;
tag->type = type;
tag->data.reset(reinterpret_cast<char*>(xcalloc((size < 4) ? 4 : size, 1)), xfree);
ifd->count++;
- ifd->tags.append(*tag);
- tag = &ifd->tags.last();
} else {
if (size == 0) { /* remove this element */
ifd->count--;